﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace KXCXW.Web.CommonClass
{
    /// <summary>
    /// 字符串帮助类
    /// </summary>
    public sealed class StrHelper
    {
        private StrHelper() { }

        #region 字符串处理

        /// <summary>
        /// 空字符串处理
        /// </summary>
        /// <param name="srcStr"></param>
        /// <param name="replaceNullValue">如果字符串为空，用什么文本来替代</param>
        /// <returns></returns>
        public static string IsNull(string srcStr, string replaceNullValue)
        {
            if (string.IsNullOrEmpty(srcStr))
            {
                return replaceNullValue;
            }

            return srcStr;
        }

        #endregion
    }
}